﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsGame4
{
    abstract class AIObject
    {
        private String id;
        private TypeAIObject type;
        private String idEmitter;


        public enum TypeAIObject { AIProjectile = 0 , AIEnemy = 1, AIPlayer = 2, AIBomb = 3, AIExplosion = 4};
        protected StateMachine stateMachine;

        public AIObject(String id, TypeAIObject type)
        {
            this.id = id;
            this.type = type;
            this.idEmitter = null;
        }

        public String Id
        {
            get { return id; }
            set { id = value; }
        }

        abstract public void update();

        public TypeAIObject Type
        {
            get { return type; }
            set { type = value; }
        }

        public String IdEmitter
        {
            get { return idEmitter; }
            set { idEmitter = value; }
        }

        
        public StateMachine StateMachine
        {
            get { return stateMachine; }
            set { stateMachine = value; }
        }

        public Boolean HandleMessage(Message message)
        {
            return stateMachine.HandleMessage(message);
        }
    }
}
